package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class WindowDefinitionList {

    private int beginIndex;
    private int endIndex;
    private List<WindowDefinition> windowDefinitionList;

    public WindowDefinitionList(List<WindowDefinition> windowDefinitionList) {
        this.beginIndex = windowDefinitionList.get(0).getBeginIndex();
        this.endIndex = windowDefinitionList.get(windowDefinitionList.size() - 1).getEndIndex();
        this.windowDefinitionList = windowDefinitionList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return windowDefinitionList.size();
    }

    public WindowDefinition get(int index) {
        return windowDefinitionList.get(index);
    }

}
